<include file="public@header"/>
</script>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('GoodsActivity/index')}">商品秒杀</a></li>
        <li class="active"><a href="#">编辑活动</a></li>
    </ul>
    <form class="form-horizontal js-ajax-form margin-top-20" role="form" action="{:url('GoodsActivity/edit')}"
          method="post">
          <input type="hidden" name="id" value="{$info['id']}">
        <fieldset>
            <div class="tabbable">
                <div class="tab-content">
                    <div class="tab-pane active" id="A">
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">活动开始时间</label>
                            <div class="col-md-3 col-sm-5">
                                <input class="js-datetime form-control" type="text" id="input-datetime" value="{$info['stime']}" 
                                    name="stime">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">活动结束时间</label>
                            <div class="col-md-3 col-sm-5">
                                <input class="js-datetime form-control" type="text" id="input-datetime" value="{$info['etime']}" 
                                    name="etime">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="input-site-name" class="col-sm-2 control-label">参加活动商品</label>
                            <div class="col-md-3 col-sm-5">
                                <foreach name="goods" item="vo">
                                <div style="display:flex;align-items: center;margin-top:5px;">
                                    <input type="checkbox" <if condition ="isset($info['value'][$vo['id']])"> checked </if> name="goods_id[]" value="{$vo.id}">
                                    <span>{$vo.name}</span> &nbsp;&nbsp;&nbsp;&nbsp;
                                    <span>价格:</span>&nbsp;&nbsp;
                                    <input style="width:100px;height:32px;" name="goods_price[]" class="form-control" 
                                    <if condition ="isset($info['value'][$vo['id']])"> value="{$info['value'][$vo['id']]}" </if> type="text">
                                </div>
                                </foreach>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" style="width:150px;" class="btn btn-primary">
                                    {:lang('SAVE')}
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </fieldset>
    </form>

</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
</body>
</html>
